package router

import (
	"api-gateway/handler/api"
	"github.com/gin-gonic/gin"
)

func Router(r *gin.Engine) {
	apiGroup := r.Group("/api")
	{
		patient := apiGroup.Group("/patient")
		{
			patient.POST("/login", api.Login)
		}

		doctor := apiGroup.Group("/doctor")
		{
			doctor.POST("/add", api.AddDoctor)
		}

		reservation := apiGroup.Group("/reservation")
		{
			reservation.POST("/add", api.AddReservation)
		}

		record := apiGroup.Group("/record")
		{
			record.POST("/add", api.AddRecord)
		}

		prescript := apiGroup.Group("/prescript")
		{
			prescript.POST("/update", api.UpdatePrescript)
		}

		order := apiGroup.Group("/order")
		{
			order.GET("/detail", api.GetOrderDetail)
		}
	}

}
